package com.happy016.entity.user;



import com.happy016.entity.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * 框架 Demo
 * @author linyb
 * create on 2017/8/4 10:13
 */
@Table(name="t_user")
public class User extends BaseEntity {
    private String username;
    private String telephone;
    @Column(name = "createTime")  //指定对应表列名,当表字段表出现驼峰这种形式的,最好显示指定
    private Date   createTime;
    private Integer status;

    //这个注解的意思是 alias字段不是数据库表的字段,但是可能返回回来的字段有alias这字段
    //一般用于  字段 as 返回,如select username as alias from t_user;
    @Transient
    private String alias;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }
}
